package com.rivulet.foreign.mapper;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * {计数功能}
 *
 * @author xujiac
 * @create 2021/7/27
 * @since 1.0.0
 */
@Component
public interface CountMapper {

    /**
     * 获得scholarship数据条数
     *
     * @return
     */
    @Select("SELECT COUNT(*) FROM t_scholarship")
    public Integer scholarshipNumber();

    /**
     * 获得scholarship中已审核的数据条数
     *
     * @return
     */
    @Select("SELECT COUNT(*) FROM t_scholarship WHERE advice is not Null")
    public Integer scholarshipPassNumber();

    /**
     * 获得scholarship中未审核的数据条数
     *
     * @return
     */
    @Select("SELECT COUNT(*) FROM t_scholarship WHERE advice is Null")
    public Integer scholarshipToDo();

    /**
     * 获取vacation中所有未审核的数据条数
     *
     * @return
     */
    @Select("SELECT COUNT(*) FROM t_vacation WHERE is_yes is Null")
    public Integer vacationYet();
}
